<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#375EAB">
<title>Gosl &ndash; package fun</title>
<link type="text/css" rel="stylesheet" href="static/style.css">
<script type="text/javascript" src="static/godocs.js"></script>
<style type="text/css"></style>
</head>
<body>
<div id="page" class=\wide">
<div class="container">
<h1>Gosl &ndash; <b>fun</b> &ndash; Scalar functions of one scalar and one vector</h1>
use 'godoc cmd/github.com/cpmech/gosl/fun' for documentation on the github.com/cpmech/gosl/fun command 

<!--
	Copyright 2009 The Go Authors. All rights reserved.
	Use of this source code is governed by a BSD-style
	license that can be found in the LICENSE file.
-->
<!--
	Note: Static (i.e., not template-generated) href and id
	attributes start with "pkg-" to make it impossible for
	them to conflict with generated attributes (some of which
	correspond to Go identifiers).
-->

	<script type='text/javascript'>
	document.ANALYSIS_DATA = ;
	document.CALLGRAPH = ;
	</script>

	
		
		<div id="short-nav">
			<dl>
			<dd><code>import "github.com/cpmech/gosl/fun"</code></dd>
			</dl>
			<dl>
			<dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
			<dd><a href="#pkg-index" class="indexLink">Index</a></dd>
			
			
				<dd><a href="#pkg-subdirectories">Subdirectories</a></dd>
			
			</dl>
		</div>
		<!-- The package's Name is printed as title by the top-level template -->
		<div id="pkg-overview" class="toggleVisible">
			<div class="collapsed">
				<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
			</div>
			<div class="expanded">
				<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
				<p>
fun (functions) implements a number of y(t,x) functions and their first and second order derivatives
</p>

			</div>
		</div>
		

		<div id="pkg-index" class="toggleVisible">
		<div class="collapsed">
			<h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
		</div>
		<div class="expanded">
			<h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>

		<!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
			<div id="manual-nav">
			<dl>
			
			
				<dd><a href="#pkg-variables">Variables</a></dd>
			
			
				
				<dd><a href="#Atan2p">func Atan2p(y, x float64) (αrad float64)</a></dd>
			
				
				<dd><a href="#Atan2pDeg">func Atan2pDeg(y, x float64) (αdeg float64)</a></dd>
			
				
				<dd><a href="#CheckDerivT">func CheckDerivT(tst *testing.T, o Func, t0, tf float64, xcte []float64, np int, tskip []float64, sktol, dtol, dtol2 float64, ver bool)</a></dd>
			
				
				<dd><a href="#CheckDerivX">func CheckDerivX(tst *testing.T, o Func, tcte float64, xmin, xmax []float64, np int, xskip [][]float64, sktol, dtol float64, ver bool)</a></dd>
			
				
				<dd><a href="#Heav">func Heav(x float64) float64</a></dd>
			
				
				<dd><a href="#PlotT">func PlotT(o Func, dirout, fname string, t0, tf float64, xcte []float64, np int, labelT, labelF, labelG, labelH, argsF, argsG, argsH string)</a></dd>
			
				
				<dd><a href="#PlotX">func PlotX(o Func, dirout, fname string, tcte float64, xmin, xmax []float64, np int, args string, withGrad, hlZero, axEqual, save, show bool, extra func())</a></dd>
			
				
				<dd><a href="#Ramp">func Ramp(x float64) float64</a></dd>
			
				
				<dd><a href="#Sabs">func Sabs(x, eps float64) float64</a></dd>
			
				
				<dd><a href="#SabsD1">func SabsD1(x, eps float64) float64</a></dd>
			
				
				<dd><a href="#SabsD2">func SabsD2(x, eps float64) float64</a></dd>
			
				
				<dd><a href="#Sign">func Sign(x float64) float64</a></dd>
			
				
				<dd><a href="#Sramp">func Sramp(x, β float64) float64</a></dd>
			
				
				<dd><a href="#SrampD1">func SrampD1(x, β float64) float64</a></dd>
			
				
				<dd><a href="#SrampD2">func SrampD2(x, β float64) float64</a></dd>
			
			
				
				<dd><a href="#Add">type Add</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Add.F">func (o Add) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Add.G">func (o Add) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Add.Grad">func (o Add) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Add.H">func (o Add) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Add.Init">func (o *Add) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Cdist">type Cdist</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Cdist.F">func (o Cdist) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cdist.G">func (o Cdist) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cdist.Grad">func (o Cdist) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cdist.H">func (o Cdist) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cdist.Init">func (o *Cdist) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Cos">type Cos</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Cos.F">func (o Cos) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cos.G">func (o Cos) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cos.Grad">func (o Cos) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cos.H">func (o Cos) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cos.Init">func (o *Cos) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Cte">type Cte</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Cte.F">func (o Cte) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cte.G">func (o Cte) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cte.Grad">func (o Cte) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cte.H">func (o Cte) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Cte.Init">func (o *Cte) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#CutSin">type CutSin</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#CutSin.F">func (o CutSin) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#CutSin.G">func (o CutSin) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#CutSin.Grad">func (o CutSin) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#CutSin.H">func (o CutSin) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#CutSin.Init">func (o *CutSin) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Exc1">type Exc1</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc1.F">func (o Exc1) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc1.G">func (o Exc1) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc1.Grad">func (o Exc1) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc1.H">func (o Exc1) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc1.Init">func (o *Exc1) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Exc2">type Exc2</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc2.F">func (o Exc2) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc2.G">func (o Exc2) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc2.Grad">func (o Exc2) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc2.H">func (o Exc2) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Exc2.Init">func (o *Exc2) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Func">type Func</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#New">func New(name string, prms Prms) (Func, error)</a></dd>
				
				
			
				
				<dd><a href="#Halo">type Halo</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Halo.F">func (o Halo) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Halo.G">func (o Halo) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Halo.Grad">func (o Halo) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Halo.H">func (o Halo) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Halo.Init">func (o *Halo) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Lin">type Lin</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Lin.F">func (o Lin) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Lin.G">func (o Lin) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Lin.Grad">func (o Lin) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Lin.H">func (o Lin) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Lin.Init">func (o *Lin) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Mul">type Mul</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Mul.F">func (o Mul) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Mul.G">func (o Mul) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Mul.Grad">func (o Mul) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Mul.H">func (o Mul) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Mul.Init">func (o *Mul) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Prm">type Prm</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Prm.Connect">func (o *Prm) Connect(V *float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Prm.Set">func (o *Prm) Set(V float64)</a></dd>
				
			
				
				<dd><a href="#Prms">type Prms</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Prms.Connect">func (o *Prms) Connect(V *float64, name, caller string) (err string)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Prms.ConnectSet">func (o *Prms) ConnectSet(V []*float64, names []string, caller string) (err string)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Prms.Find">func (o *Prms) Find(name string) *Prm</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Prms.GetValues">func (o *Prms) GetValues(names []string) (values []float64, found []bool)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Prms.String">func (o Prms) String() (l string)</a></dd>
				
			
				
				<dd><a href="#Pts">type Pts</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Pts.F">func (o Pts) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Pts.G">func (o Pts) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Pts.Grad">func (o Pts) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Pts.H">func (o Pts) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Pts.Init">func (o *Pts) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Pulse">type Pulse</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Pulse.F">func (o Pulse) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Pulse.G">func (o Pulse) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Pulse.Grad">func (o Pulse) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Pulse.H">func (o Pulse) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Pulse.Init">func (o *Pulse) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#RefDecGen">type RefDecGen</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecGen.F">func (o RefDecGen) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecGen.G">func (o RefDecGen) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecGen.Grad">func (o RefDecGen) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecGen.H">func (o RefDecGen) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecGen.Init">func (o *RefDecGen) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#RefDecSp1">type RefDecSp1</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecSp1.F">func (o RefDecSp1) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecSp1.G">func (o RefDecSp1) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecSp1.Grad">func (o RefDecSp1) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecSp1.H">func (o RefDecSp1) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefDecSp1.Init">func (o *RefDecSp1) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#RefIncRL1">type RefIncRL1</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#RefIncRL1.F">func (o RefIncRL1) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefIncRL1.G">func (o RefIncRL1) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefIncRL1.Grad">func (o RefIncRL1) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefIncRL1.H">func (o RefIncRL1) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#RefIncRL1.Init">func (o *RefIncRL1) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Rmp">type Rmp</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Rmp.F">func (o Rmp) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Rmp.G">func (o Rmp) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Rmp.Grad">func (o Rmp) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Rmp.H">func (o Rmp) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Rmp.Init">func (o *Rmp) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Sin">type Sin</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Sin.F">func (o Sin) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Sin.G">func (o Sin) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Sin.Grad">func (o Sin) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Sin.H">func (o Sin) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Sin.Init">func (o *Sin) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Srmps">type Srmps</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Srmps.F">func (o Srmps) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Srmps.G">func (o Srmps) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Srmps.Grad">func (o Srmps) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Srmps.H">func (o Srmps) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Srmps.Init">func (o *Srmps) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Xpoly1">type Xpoly1</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly1.F">func (o Xpoly1) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly1.G">func (o Xpoly1) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly1.Grad">func (o Xpoly1) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly1.H">func (o Xpoly1) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly1.Init">func (o *Xpoly1) Init(prms Prms) (err error)</a></dd>
				
			
				
				<dd><a href="#Xpoly2">type Xpoly2</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly2.F">func (o Xpoly2) F(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly2.G">func (o Xpoly2) G(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly2.Grad">func (o Xpoly2) Grad(v []float64, t float64, x []float64)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly2.H">func (o Xpoly2) H(t float64, x []float64) float64</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Xpoly2.Init">func (o *Xpoly2) Init(prms Prms) (err error)</a></dd>
				
			
			
			</dl>
			</div><!-- #manual-nav -->

		

		
			<h4>Package files</h4>
			<p>
			<span style="font-size:90%">
			
				<a href="/src/github.com/cpmech/gosl/fun/auxiliary.go">auxiliary.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_add.go">f_add.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_cdist.go">f_cdist.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_cos.go">f_cos.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_cte.go">f_cte.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_cutsin.go">f_cutsin.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_exc1.go">f_exc1.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_exc2.go">f_exc2.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_halo.go">f_halo.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_lin.go">f_lin.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_mul.go">f_mul.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_pts.go">f_pts.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_pulse.go">f_pulse.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_ref-dec-gen.go">f_ref-dec-gen.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_ref-dec-sp1.go">f_ref-dec-sp1.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_ref-inc-rl1.go">f_ref-inc-rl1.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_rmp.go">f_rmp.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_sin.go">f_sin.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_srmps.go">f_srmps.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_xpoly1.go">f_xpoly1.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/f_xpoly2.go">f_xpoly2.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/func.go">func.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/functions.go">functions.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/prms.go">prms.go</a>
			
				<a href="/src/github.com/cpmech/gosl/fun/testing.go">testing.go</a>
			
			</span>
			</p>
		
		</div><!-- .expanded -->
		</div><!-- #pkg-index -->

		<div id="pkg-callgraph" class="toggle" style="display: none">
		<div class="collapsed">
			<h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
		</div> <!-- .expanded -->
		<div class="expanded">
			<h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
			<p>
			  In the call graph viewer below, each node
			  is a function belonging to this package
			  and its children are the functions it
			  calls&mdash;perhaps dynamically.
			</p>
			<p>
			  The root nodes are the entry points of the
			  package: functions that may be called from
			  outside the package.
			  There may be non-exported or anonymous
			  functions among them if they are called
			  dynamically from another package.
			</p>
			<p>
			  Click a node to visit that function's source code.
			  From there you can visit its callers by
			  clicking its declaring <code>func</code>
			  token.
			</p>
			<p>
			  Functions may be omitted if they were
			  determined to be unreachable in the
			  particular programs or tests that were
			  analyzed.
			</p>
			<!-- Zero means show all package entry points. -->
			<ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
		</div>
		</div> <!-- #pkg-callgraph -->

		
		
			<h2 id="pkg-variables">Variables</h2>
			
				<pre>var (
    <span id="G_extraindent">G_extraindent</span> <a href="/pkg/builtin/#string">string</a> <span class="comment">// extra indentation</span>
)</pre>
				<p>
global auxiliary variables
</p>

			
				<pre>var <span id="One">One</span> = <a href="#Cte">Cte</a>{1}</pre>
				<p>
One implements an specialisation of Cte function that always returns one
</p>

			
		
		
			
			
			<h2 id="Atan2p">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=277:318#L1">Atan2p</a></h2>
			<pre>func Atan2p(y, x <a href="/pkg/builtin/#float64">float64</a>) (αrad <a href="/pkg/builtin/#float64">float64</a>)</pre>
			<p>
Atan2p implements a positive version of atan2, in such a way that: 0 ≤ α ≤ 2π
</p>

			
			

		
			
			
			<h2 id="Atan2pDeg">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=494:538#L9">Atan2pDeg</a></h2>
			<pre>func Atan2pDeg(y, x <a href="/pkg/builtin/#float64">float64</a>) (αdeg <a href="/pkg/builtin/#float64">float64</a>)</pre>
			<p>
Atan2pDeg implements a positive version of atan2, in such a way that: 0 ≤ α ≤ 360
</p>

			
			

		
			
			
			<h2 id="CheckDerivT">func <a href="https://github.com/cpmech/gosl/blob/master/fun/testing.go?s=395:530#L8">CheckDerivT</a></h2>
			<pre>func CheckDerivT(tst *<a href="/pkg/testing/">testing</a>.<a href="/pkg/testing/#T">T</a>, o <a href="#Func">Func</a>, t0, tf <a href="/pkg/builtin/#float64">float64</a>, xcte []<a href="/pkg/builtin/#float64">float64</a>, np <a href="/pkg/builtin/#int">int</a>, tskip []<a href="/pkg/builtin/#float64">float64</a>, sktol, dtol, dtol2 <a href="/pkg/builtin/#float64">float64</a>, ver <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
CheckDerivT checks derivatives w.r.t to t for fixed coordinates x
</p>

			
			

		
			
			
			<h2 id="CheckDerivX">func <a href="https://github.com/cpmech/gosl/blob/master/fun/testing.go?s=1191:1325#L35">CheckDerivX</a></h2>
			<pre>func CheckDerivX(tst *<a href="/pkg/testing/">testing</a>.<a href="/pkg/testing/#T">T</a>, o <a href="#Func">Func</a>, tcte <a href="/pkg/builtin/#float64">float64</a>, xmin, xmax []<a href="/pkg/builtin/#float64">float64</a>, np <a href="/pkg/builtin/#int">int</a>, xskip [][]<a href="/pkg/builtin/#float64">float64</a>, sktol, dtol <a href="/pkg/builtin/#float64">float64</a>, ver <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
CheckDerivX checks derivatives w.r.t to x for fixed t
</p>

			
			

		
			
			
			<h2 id="Heav">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=800:828#L26">Heav</a></h2>
			<pre>func Heav(x <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
Heaviside step function (== derivative of Ramp(x))
</p>

			
			

		
			
			
			<h2 id="PlotT">func <a href="https://github.com/cpmech/gosl/blob/master/fun/func.go?s=1516:1657#L40">PlotT</a></h2>
			<pre>func PlotT(o <a href="#Func">Func</a>, dirout, fname <a href="/pkg/builtin/#string">string</a>, t0, tf <a href="/pkg/builtin/#float64">float64</a>, xcte []<a href="/pkg/builtin/#float64">float64</a>, np <a href="/pkg/builtin/#int">int</a>,
    labelT, labelF, labelG, labelH, argsF, argsG, argsH <a href="/pkg/builtin/#string">string</a>)</pre>
			<p>
PlotT plots F, G and H for varying t and fixed coordinates x
</p>
<pre>fname       -- filename to safe figure
args{F,G,H} -- if any is &#34;&#34;, the corresponding plot is not created
</pre>

			
			

		
			
			
			<h2 id="PlotX">func <a href="https://github.com/cpmech/gosl/blob/master/fun/func.go?s=3268:3423#L134">PlotX</a></h2>
			<pre>func PlotX(o <a href="#Func">Func</a>, dirout, fname <a href="/pkg/builtin/#string">string</a>, tcte <a href="/pkg/builtin/#float64">float64</a>, xmin, xmax []<a href="/pkg/builtin/#float64">float64</a>, np <a href="/pkg/builtin/#int">int</a>, args <a href="/pkg/builtin/#string">string</a>, withGrad, hlZero, axEqual, save, show <a href="/pkg/builtin/#bool">bool</a>, extra func())</pre>
			<p>
PlotX plots F and the gradient of F, Gx and Gy, for varying x and fixed t
</p>
<pre>hlZero  -- highlight F(t,x) = 0
axEqual -- use axis[&#39;equal&#39;]
</pre>

			
			

		
			
			
			<h2 id="Ramp">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=672:700#L18">Ramp</a></h2>
			<pre>func Ramp(x <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
Ramp function =&gt; MacAulay brackets
</p>

			
			

		
			
			
			<h2 id="Sabs">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=1629:1662#L72">Sabs</a></h2>
			<pre>func Sabs(x, eps <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
Sabs implements a smooth abs function: Sabs(x) = x*x / (sign(x)*x + eps)
</p>

			
			

		
			
			
			<h2 id="SabsD1">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=1812:1847#L83">SabsD1</a></h2>
			<pre>func SabsD1(x, eps <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
SabsD1 returns the first derivative of Sabs
</p>

			
			

		
			
			
			<h2 id="SabsD2">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=2027:2062#L96">SabsD2</a></h2>
			<pre>func SabsD2(x, eps <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
SabsD2 returns the first derivative of Sabs
</p>

			
			

		
			
			
			<h2 id="Sign">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=923:951#L37">Sign</a></h2>
			<pre>func Sign(x <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
Sign function
</p>

			
			

		
			
			
			<h2 id="Sramp">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=1079:1112#L48">Sramp</a></h2>
			<pre>func Sramp(x, β <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
Sramp implements a smooth ramp function. Ramp
</p>

			
			

		
			
			
			<h2 id="SrampD1">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=1248:1283#L56">SrampD1</a></h2>
			<pre>func SrampD1(x, β <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
SrampD1 returns the first derivative of Sramp
</p>

			
			

		
			
			
			<h2 id="SrampD2">func <a href="https://github.com/cpmech/gosl/blob/master/fun/functions.go?s=1413:1448#L64">SrampD2</a></h2>
			<pre>func SrampD2(x, β <a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
			<p>
SrampD2 returns the second derivative of Sramp
</p>

			
			

		
		
			
			
			<h2 id="Add">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_add.go?s=304:352#L1">Add</a></h2>
			<pre>type Add struct {
    Fa, Fb <a href="#Func">Func</a>
    A, B   <a href="/pkg/builtin/#float64">float64</a>
}</pre>
			<p>
Add implements the addition of two other functions.
</p>
<pre>F(t, x) := A*Fa(t,x) + B*Fb(t,x)
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Add.F">func (Add) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_add.go?s=806:852#L30">F</a></h3>
				<pre>func (o <a href="#Add">Add</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Add.G">func (Add) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_add.go?s=987:1033#L38">G</a></h3>
				<pre>func (o <a href="#Add">Add</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Add.Grad">func (Add) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_add.go?s=1361:1415#L54">Grad</a></h3>
				<pre>func (o <a href="#Add">Add</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Add.H">func (Add) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_add.go?s=1172:1218#L46">H</a></h3>
				<pre>func (o <a href="#Add">Add</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Add.Init">func (*Add) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_add.go?s=484:525#L12">Init</a></h3>
				<pre>func (o *<a href="#Add">Add</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Cdist">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cdist.go?s=556:691#L9">Cdist</a></h2>
			<pre>type Cdist struct {
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Cdist implements the distance from point to a circle (2D) or a sphere (3D)
where the circle/sphere is implicitly defined by means of F(x) = 0.
</p>
<pre>where
  F(x) = sqrt((x-xc) dot (x-xc)) - r
with r being the radius and xc the coordinates of the centre.
Thus F &gt; 0 is outside and F &lt; 0 is inside the circle/sphere
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Cdist.F">func (Cdist) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cdist.go?s=1402:1450#L47">F</a></h3>
				<pre>func (o <a href="#Cdist">Cdist</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Cdist.G">func (Cdist) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cdist.go?s=1653:1701#L56">G</a></h3>
				<pre>func (o <a href="#Cdist">Cdist</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Cdist.Grad">func (Cdist) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cdist.go?s=1869:1925#L66">Grad</a></h3>
				<pre>func (o <a href="#Cdist">Cdist</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Cdist.H">func (Cdist) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cdist.go?s=1759:1807#L61">H</a></h3>
				<pre>func (o <a href="#Cdist">Cdist</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Cdist.Init">func (*Cdist) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cdist.go?s=827:870#L20">Init</a></h3>
				<pre>func (o *<a href="#Cdist">Cdist</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Cos">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cos.go?s=404:505#L7">Cos</a></h2>
			<pre>type Cos struct {

    <span class="comment">// parameters</span>
    A <a href="/pkg/builtin/#float64">float64</a>
    B <a href="/pkg/builtin/#float64">float64</a>
    C <a href="/pkg/builtin/#float64">float64</a>
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Cos implements y(t) = a * cos(b*t) + c
Input:
</p>
<pre>b/pi -- is a flag that says that b is in fact b divided by π
        thus, the code will multiply b by π internally
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Cos.F">func (Cos) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cos.go?s=1027:1073#L41">F</a></h3>
				<pre>func (o <a href="#Cos">Cos</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Cos.G">func (Cos) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cos.go?s=1204:1250#L50">G</a></h3>
				<pre>func (o <a href="#Cos">Cos</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Cos.Grad">func (Cos) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cos.go?s=1576:1630#L68">Grad</a></h3>
				<pre>func (o <a href="#Cos">Cos</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Cos.H">func (Cos) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cos.go?s=1386:1432#L59">H</a></h3>
				<pre>func (o <a href="#Cos">Cos</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Cos.Init">func (*Cos) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cos.go?s=637:678#L24">Init</a></h3>
				<pre>func (o *<a href="#Cos">Cos</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Cte">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cte.go?s=436:466#L6">Cte</a></h2>
			<pre>type Cte struct {
    C <a href="/pkg/builtin/#float64">float64</a>
}</pre>
			<p>
Cte implements a constant function
</p>


			

			
				<pre>var <span id="Zero">Zero</span> <a href="#Cte">Cte</a></pre>
				<p>
Zero implements an specialisation of Cte function that always returns zero
</p>

			

			
			
			

			

			
				
				<h3 id="Cte.F">func (Cte) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cte.go?s=768:814#L25">F</a></h3>
				<pre>func (o <a href="#Cte">Cte</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Cte.G">func (Cte) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cte.go?s=890:936#L31">G</a></h3>
				<pre>func (o <a href="#Cte">Cte</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
first derivative
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Cte.Grad">func (Cte) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cte.go?s=1127:1181#L42">Grad</a></h3>
				<pre>func (o <a href="#Cte">Cte</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Cte.H">func (Cte) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cte.go?s=1017:1063#L37">H</a></h3>
				<pre>func (o <a href="#Cte">Cte</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
second derivative
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Cte.Init">func (*Cte) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cte.go?s=598:639#L16">Init</a></h3>
				<pre>func (o *<a href="#Cte">Cte</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="CutSin">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cutsin.go?s=612:736#L13">CutSin</a></h2>
			<pre>type CutSin struct {

    <span class="comment">// parameters</span>
    A <a href="/pkg/builtin/#float64">float64</a>
    B <a href="/pkg/builtin/#float64">float64</a>
    C <a href="/pkg/builtin/#float64">float64</a>
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Cutsin implements
</p>
<pre>if find[&#34;cps&#34;]: # means cut_positive is True
	if y &lt; 0: y(t) = a * sin(b*t) + c
 	else: y(t) = 0
else:			# means cut_positive is False so cut negative values
	if y &gt; 0: y(t) = a * sin(b*t) + c
 	else: y(t) = 0
</pre>
<p>
Input:
</p>
<pre>b/pi -- is a flag that says that b is in fact b divided by π
        thus, the code will multiply b by π internally
</pre>


			

			

			
			
			

			

			
				
				<h3 id="CutSin.F">func (CutSin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cutsin.go?s=1383:1432#L54">F</a></h3>
				<pre>func (o <a href="#CutSin">CutSin</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="CutSin.G">func (CutSin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cutsin.go?s=1763:1812#L75">G</a></h3>
				<pre>func (o <a href="#CutSin">CutSin</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="CutSin.Grad">func (CutSin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cutsin.go?s=2545:2602#L117">Grad</a></h3>
				<pre>func (o <a href="#CutSin">CutSin</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="CutSin.H">func (CutSin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cutsin.go?s=2147:2196#L96">H</a></h3>
				<pre>func (o <a href="#CutSin">CutSin</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="CutSin.Init">func (*CutSin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_cutsin.go?s=875:919#L31">Init</a></h3>
				<pre>func (o *<a href="#CutSin">CutSin</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Exc1">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc1.go?s=276:310#L4">Exc1</a></h2>
			<pre>type Exc1 struct {
    A, B <a href="/pkg/builtin/#float64">float64</a>
}</pre>
			<p>
Excitation #1 y(t) = a * (1 - cos(b*π*t)) / 2
</p>


			

			

			
			
			

			

			
				
				<h3 id="Exc1.F">func (Exc1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc1.go?s=662:709#L24">F</a></h3>
				<pre>func (o <a href="#Exc1">Exc1</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Exc1.G">func (Exc1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc1.go?s=805:852#L29">G</a></h3>
				<pre>func (o <a href="#Exc1">Exc1</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Exc1.Grad">func (Exc1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc1.go?s=1135:1190#L39">Grad</a></h3>
				<pre>func (o <a href="#Exc1">Exc1</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Exc1.H">func (Exc1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc1.go?s=960:1007#L34">H</a></h3>
				<pre>func (o <a href="#Exc1">Exc1</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Exc1.Init">func (*Exc1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc1.go?s=443:485#L14">Init</a></h3>
				<pre>func (o *<a href="#Exc1">Exc1</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Exc2">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc2.go?s=284:340#L4">Exc2</a></h2>
			<pre>type Exc2 struct {
    Ta <a href="/pkg/builtin/#float64">float64</a>
    A  <a href="/pkg/builtin/#float64">float64</a>
    B  <a href="/pkg/builtin/#float64">float64</a>
}</pre>
			<p>
Excitation # 2: y(t) = if t &lt; ta a*sin(b*π*t), else 0
</p>


			

			

			
			
			

			

			
				
				<h3 id="Exc2.F">func (Exc2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc2.go?s=741:788#L27">F</a></h3>
				<pre>func (o <a href="#Exc2">Exc2</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Exc2.G">func (Exc2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc2.go?s=901:948#L35">G</a></h3>
				<pre>func (o <a href="#Exc2">Exc2</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Exc2.Grad">func (Exc2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc2.go?s=1282:1337#L51">Grad</a></h3>
				<pre>func (o <a href="#Exc2">Exc2</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Exc2.H">func (Exc2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc2.go?s=1081:1128#L43">H</a></h3>
				<pre>func (o <a href="#Exc2">Exc2</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Exc2.Init">func (*Exc2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_exc2.go?s=473:515#L16">Init</a></h3>
				<pre>func (o *<a href="#Exc2">Exc2</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Func">type <a href="https://github.com/cpmech/gosl/blob/master/fun/func.go?s=497:877#L9">Func</a></h2>
			<pre>type Func interface {
    Init(prms <a href="#Prms">Prms</a>) <a href="/pkg/builtin/#error">error</a>                     <span class="comment">// initialise function parameters</span>
    F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a>         <span class="comment">// y = F(t, x)</span>
    G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a>         <span class="comment">// ∂y/∂t_cteX = G(t, x)</span>
    H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a>         <span class="comment">// ∂²y/∂t²_cteX = H(t, x)</span>
    Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <span class="comment">// ∇F = ∂y/∂x = Grad(t, x)</span>
}</pre>
			<p>
Func defines the interface for simple functions
</p>


			

			

			
			
			

			
				
				<h3 id="New">func <a href="https://github.com/cpmech/gosl/blob/master/fun/func.go?s=1041:1087#L21">New</a></h3>
				<pre>func New(name <a href="/pkg/builtin/#string">string</a>, prms <a href="#Prms">Prms</a>) (<a href="#Func">Func</a>, <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
New allocates function by name
</p>

				
				
			

			
		
			
			
			<h2 id="Halo">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_halo.go?s=509:643#L5">Halo</a></h2>
			<pre>type Halo struct {
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Halo implements the equation of a circle in 2D or a sphere in 3D
by means of the following implicit form F(x) = 0
</p>
<pre>where
  F(x) = (x-xc) dot (x-xc) - r^2
with r being the radius and xc the coordinates of the centre.
Thus F &gt; 0 is outside and F &lt; 0 is inside the circle/sphere
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Halo.F">func (Halo) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_halo.go?s=1346:1393#L43">F</a></h3>
				<pre>func (o <a href="#Halo">Halo</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Halo.G">func (Halo) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_halo.go?s=1589:1636#L52">G</a></h3>
				<pre>func (o <a href="#Halo">Halo</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Halo.Grad">func (Halo) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_halo.go?s=1803:1858#L62">Grad</a></h3>
				<pre>func (o <a href="#Halo">Halo</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Halo.H">func (Halo) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_halo.go?s=1694:1741#L57">H</a></h3>
				<pre>func (o <a href="#Halo">Halo</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Halo.Init">func (*Halo) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_halo.go?s=777:819#L16">Init</a></h3>
				<pre>func (o *<a href="#Halo">Halo</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Lin">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_lin.go?s=277:338#L1">Lin</a></h2>
			<pre>type Lin struct {
    M  <a href="/pkg/builtin/#float64">float64</a> <span class="comment">// slope</span>
    Ts <a href="/pkg/builtin/#float64">float64</a> <span class="comment">// shift</span>
}</pre>
			<p>
Lin implements a linear function w.r.t t
</p>
<pre>y = m * (t - ts)
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Lin.F">func (Lin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_lin.go?s=683:729#L22">F</a></h3>
				<pre>func (o <a href="#Lin">Lin</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Lin.G">func (Lin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_lin.go?s=798:844#L27">G</a></h3>
				<pre>func (o <a href="#Lin">Lin</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Lin.Grad">func (Lin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_lin.go?s=1012:1066#L37">Grad</a></h3>
				<pre>func (o <a href="#Lin">Lin</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Lin.H">func (Lin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_lin.go?s=904:950#L32">H</a></h3>
				<pre>func (o <a href="#Lin">Lin</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Lin.Init">func (*Lin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_lin.go?s=470:511#L12">Init</a></h3>
				<pre>func (o *<a href="#Lin">Lin</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Mul">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_mul.go?s=306:338#L1">Mul</a></h2>
			<pre>type Mul struct {
    Fa, Fb <a href="#Func">Func</a>
}</pre>
			<p>
Mul implements the multiplication of two other functions.
</p>
<pre>F(t, x) := fa(t,x) * fb(t,x)
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Mul.F">func (Mul) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_mul.go?s=728:774#L26">F</a></h3>
				<pre>func (o <a href="#Mul">Mul</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Mul.G">func (Mul) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_mul.go?s=952:998#L35">G</a></h3>
				<pre>func (o <a href="#Mul">Mul</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Mul.Grad">func (Mul) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_mul.go?s=1496:1550#L53">Grad</a></h3>
				<pre>func (o <a href="#Mul">Mul</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Mul.H">func (Mul) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_mul.go?s=1206:1252#L44">H</a></h3>
				<pre>func (o <a href="#Mul">Mul</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Mul.Init">func (*Mul) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_mul.go?s=470:511#L11">Init</a></h3>
				<pre>func (o *<a href="#Mul">Mul</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Prm">type <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=377:1251#L8">Prm</a></h2>
			<pre>type Prm struct {

    <span class="comment">// input</span>
    N      <a href="/pkg/builtin/#string">string</a>  `json:&#34;n&#34;`      <span class="comment">// name of parameter</span>
    V      <a href="/pkg/builtin/#float64">float64</a> `json:&#34;v&#34;`      <span class="comment">// value of parameter</span>
    Min    <a href="/pkg/builtin/#float64">float64</a> `json:&#34;min&#34;`    <span class="comment">// min value</span>
    Max    <a href="/pkg/builtin/#float64">float64</a> `json:&#34;max&#34;`    <span class="comment">// max value</span>
    S      <a href="/pkg/builtin/#float64">float64</a> `json:&#34;s&#34;`      <span class="comment">// standard deviation</span>
    D      <a href="/pkg/builtin/#string">string</a>  `json:&#34;d&#34;`      <span class="comment">// probability distribution type</span>
    U      <a href="/pkg/builtin/#string">string</a>  `json:&#34;u&#34;`      <span class="comment">// unit (not verified)</span>
    Adj    <a href="/pkg/builtin/#int">int</a>     `json:&#34;adj&#34;`    <span class="comment">// adjustable: unique ID (greater than zero)</span>
    Dep    <a href="/pkg/builtin/#int">int</a>     `json:&#34;dep&#34;`    <span class="comment">// depends on &#34;adj&#34;</span>
    Extra  <a href="/pkg/builtin/#string">string</a>  `json:&#34;extra&#34;`  <span class="comment">// extra data</span>
    Inact  <a href="/pkg/builtin/#bool">bool</a>    `json:&#34;inact&#34;`  <span class="comment">// parameter is inactive in optimisation</span>
    SetDef <a href="/pkg/builtin/#bool">bool</a>    `json:&#34;setdef&#34;` <span class="comment">// tells model to use a default value</span>

    <span class="comment">// auxiliary</span>
    Fcn   <a href="#Func">Func</a> <span class="comment">// a function y=f(t,x)</span>
    Other *<a href="#Prm">Prm</a> <span class="comment">// dependency: connected parameter</span>
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Prm holds material parameter names and values
</p>


			

			

			
			
			

			

			
				
				<h3 id="Prm.Connect">func (*Prm) <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=1295:1328#L33">Connect</a></h3>
				<pre>func (o *<a href="#Prm">Prm</a>) Connect(V *<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Connect connects parameter to variable
</p>

				
				
				
			
				
				<h3 id="Prm.Set">func (*Prm) <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=1425:1453#L39">Set</a></h3>
				<pre>func (o *<a href="#Prm">Prm</a>) Set(V <a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Set sets parameter, including connected variables
</p>

				
				
				
			
		
			
			
			<h2 id="Prms">type <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=1538:1554#L47">Prms</a></h2>
			<pre>type Prms []*<a href="#Prm">Prm</a></pre>
			<p>
Prms holds many parameters
</p>


			

			

			
			
			

			

			
				
				<h3 id="Prms.Connect">func (*Prms) <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=2081:2149#L76">Connect</a></h3>
				<pre>func (o *<a href="#Prms">Prms</a>) Connect(V *<a href="/pkg/builtin/#float64">float64</a>, name, caller <a href="/pkg/builtin/#string">string</a>) (err <a href="/pkg/builtin/#string">string</a>)</pre>
				<p>
Connect connects parameter
</p>

				
				
				
			
				
				<h3 id="Prms.ConnectSet">func (*Prms) <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=2345:2428#L86">ConnectSet</a></h3>
				<pre>func (o *<a href="#Prms">Prms</a>) ConnectSet(V []*<a href="/pkg/builtin/#float64">float64</a>, names []<a href="/pkg/builtin/#string">string</a>, caller <a href="/pkg/builtin/#string">string</a>) (err <a href="/pkg/builtin/#string">string</a>)</pre>
				<p>
ConnectSet connects set of parameters
</p>

				
				
				
			
				
				<h3 id="Prms.Find">func (*Prms) <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=1625:1662#L51">Find</a></h3>
				<pre>func (o *<a href="#Prms">Prms</a>) Find(name <a href="/pkg/builtin/#string">string</a>) *<a href="#Prm">Prm</a></pre>
				<p>
Find finds a parameter by name
</p>
<pre>Note: returns nil if not found
</pre>

				
				
				
			
				
				<h3 id="Prms.GetValues">func (*Prms) <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=1776:1849#L61">GetValues</a></h3>
				<pre>func (o *<a href="#Prms">Prms</a>) GetValues(names []<a href="/pkg/builtin/#string">string</a>) (values []<a href="/pkg/builtin/#float64">float64</a>, found []<a href="/pkg/builtin/#bool">bool</a>)</pre>
				<p>
GetValues get parameter values
</p>

				
				
				
			
				
				<h3 id="Prms.String">func (Prms) <a href="https://github.com/cpmech/gosl/blob/master/fun/prms.go?s=2659:2692#L98">String</a></h3>
				<pre>func (o <a href="#Prms">Prms</a>) String() (l <a href="/pkg/builtin/#string">string</a>)</pre>
				
				
				
				
			
		
			
			
			<h2 id="Pts">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pts.go?s=338:398#L6">Pts</a></h2>
			<pre>type Pts struct {
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Pts is a function based on a linear interpolation over a set of points
</p>


			

			

			
			
			

			

			
				
				<h3 id="Pts.F">func (Pts) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pts.go?s=2160:2206#L103">F</a></h3>
				<pre>func (o <a href="#Pts">Pts</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Pts.G">func (Pts) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pts.go?s=2488:2534#L119">G</a></h3>
				<pre>func (o <a href="#Pts">Pts</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Pts.Grad">func (Pts) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pts.go?s=2866:2920#L137">Grad</a></h3>
				<pre>func (o <a href="#Pts">Pts</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Pts.H">func (Pts) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pts.go?s=2758:2804#L132">H</a></h3>
				<pre>func (o <a href="#Pts">Pts</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Pts.Init">func (*Pts) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pts.go?s=529:570#L18">Init</a></h3>
				<pre>func (o *<a href="#Pts">Pts</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Pulse">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pulse.go?s=262:331#L4">Pulse</a></h2>
			<pre>type Pulse struct {
    Ca <a href="/pkg/builtin/#float64">float64</a>
    Cb <a href="/pkg/builtin/#float64">float64</a>
    Ta <a href="/pkg/builtin/#float64">float64</a>
    Tb <a href="/pkg/builtin/#float64">float64</a>
}</pre>
			<p>
Pulse implements a ramp function
</p>


			

			

			
			
			

			

			
				
				<h3 id="Pulse.F">func (Pulse) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pulse.go?s=793:841#L29">F</a></h3>
				<pre>func (o <a href="#Pulse">Pulse</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Pulse.G">func (Pulse) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pulse.go?s=1036:1084#L40">G</a></h3>
				<pre>func (o <a href="#Pulse">Pulse</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Pulse.Grad">func (Pulse) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pulse.go?s=1592:1648#L62">Grad</a></h3>
				<pre>func (o <a href="#Pulse">Pulse</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Pulse.H">func (Pulse) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pulse.go?s=1299:1347#L51">H</a></h3>
				<pre>func (o <a href="#Pulse">Pulse</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Pulse.Init">func (*Pulse) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_pulse.go?s=467:510#L17">Init</a></h3>
				<pre>func (o *<a href="#Pulse">Pulse</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="RefDecGen">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-gen.go?s=490:754#L5">RefDecGen</a></h2>
			<pre>type RefDecGen struct {
    A, B <a href="/pkg/builtin/#float64">float64</a> <span class="comment">// lambda function coeficients</span>
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
RefDecGen implements the reference decreasing model (general)
</p>
<pre>[1] Pedroso DM, Sheng D, Zhao J. The concept of reference curves for constitutive modelling in soil mechanics, Computers and Geotechnics, 36, 1-2, <a href="http://dx.doi.org/10.1016/j.compgeo.2008.01.009">http://dx.doi.org/10.1016/j.compgeo.2008.01.009</a>
</pre>


			

			

			
			
			

			

			
				
				<h3 id="RefDecGen.F">func (RefDecGen) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-gen.go?s=1686:1738#L46">F</a></h3>
				<pre>func (o <a href="#RefDecGen">RefDecGen</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="RefDecGen.G">func (RefDecGen) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-gen.go?s=1853:1905#L51">G</a></h3>
				<pre>func (o <a href="#RefDecGen">RefDecGen</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="RefDecGen.Grad">func (RefDecGen) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-gen.go?s=2254:2314#L62">Grad</a></h3>
				<pre>func (o <a href="#RefDecGen">RefDecGen</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="RefDecGen.H">func (RefDecGen) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-gen.go?s=2037:2089#L56">H</a></h3>
				<pre>func (o <a href="#RefDecGen">RefDecGen</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="RefDecGen.Init">func (*RefDecGen) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-gen.go?s=900:947#L22">Init</a></h3>
				<pre>func (o *<a href="#RefDecGen">RefDecGen</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="RefDecSp1">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-sp1.go?s=1087:1280#L26">RefDecSp1</a></h2>
			<pre>type RefDecSp1 struct {
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
RefDecSp1 implements a specialisation of the reference decreasing model
</p>
<pre>[1] Pedroso DM, Sheng D, Zhao J. The concept of reference curves for constitutive modelling in soil mechanics, Computers and Geotechnics, 36, 1-2, <a href="http://dx.doi.org/10.1016/j.compgeo.2008.01.009">http://dx.doi.org/10.1016/j.compgeo.2008.01.009</a>

              y ^
                |
             ya o
                | \
                |
                |   \
                |
    ------------+-------------------------&gt; x
                |
             yb o--._ -\-------- λ0 = 0
                |    `.
                |      \\
                |       .
                |        \
                |         \---
                |          \ | λ1
                |           \|
                |            \
                |
                |
</pre>


			

			

			
			
			

			

			
				
				<h3 id="RefDecSp1.F">func (RefDecSp1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-sp1.go?s=2222:2274#L74">F</a></h3>
				<pre>func (o <a href="#RefDecSp1">RefDecSp1</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="RefDecSp1.G">func (RefDecSp1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-sp1.go?s=2427:2479#L82">G</a></h3>
				<pre>func (o <a href="#RefDecSp1">RefDecSp1</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="RefDecSp1.Grad">func (RefDecSp1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-sp1.go?s=2916:2976#L99">Grad</a></h3>
				<pre>func (o <a href="#RefDecSp1">RefDecSp1</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="RefDecSp1.H">func (RefDecSp1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-sp1.go?s=2659:2711#L90">H</a></h3>
				<pre>func (o <a href="#RefDecSp1">RefDecSp1</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="RefDecSp1.Init">func (*RefDecSp1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-dec-sp1.go?s=1423:1470#L43">Init</a></h3>
				<pre>func (o *<a href="#RefDecSp1">RefDecSp1</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the model
</p>

				
				
				
			
		
			
			
			<h2 id="RefIncRL1">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-inc-rl1.go?s=492:816#L7">RefIncRL1</a></h2>
			<pre>type RefIncRL1 struct {
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
RefIncRL1 implements a specialisation of the reference increasing model
Reference concept model: dydx growth but solved from right to left
with right-most initial point @ x,y=1,1 with (0 &lt;= x &lt;= 1)
Flipped model is also available if λ1 &lt; λ0 ( b == 1 )
</p>


			

			

			
			
			

			

			
				
				<h3 id="RefIncRL1.F">func (RefIncRL1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-inc-rl1.go?s=1579:1631#L54">F</a></h3>
				<pre>func (o <a href="#RefIncRL1">RefIncRL1</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="RefIncRL1.G">func (RefIncRL1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-inc-rl1.go?s=1741:1793#L59">G</a></h3>
				<pre>func (o <a href="#RefIncRL1">RefIncRL1</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="RefIncRL1.Grad">func (RefIncRL1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-inc-rl1.go?s=2140:2200#L69">Grad</a></h3>
				<pre>func (o <a href="#RefIncRL1">RefIncRL1</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="RefIncRL1.H">func (RefIncRL1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-inc-rl1.go?s=1924:1976#L64">H</a></h3>
				<pre>func (o <a href="#RefIncRL1">RefIncRL1</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="RefIncRL1.Init">func (*RefIncRL1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_ref-inc-rl1.go?s=959:1006#L28">Init</a></h3>
				<pre>func (o *<a href="#RefIncRL1">RefIncRL1</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the model
</p>

				
				
				
			
		
			
			
			<h2 id="Rmp">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_rmp.go?s=246:313#L1">Rmp</a></h2>
			<pre>type Rmp struct {
    Ca <a href="/pkg/builtin/#float64">float64</a>
    Cb <a href="/pkg/builtin/#float64">float64</a>
    Ta <a href="/pkg/builtin/#float64">float64</a>
    Tb <a href="/pkg/builtin/#float64">float64</a>
}</pre>
			<p>
Rmp implements a ramp function
</p>


			

			

			
			
			

			

			
				
				<h3 id="Rmp.F">func (Rmp) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_rmp.go?s=761:807#L25">F</a></h3>
				<pre>func (o <a href="#Rmp">Rmp</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Rmp.G">func (Rmp) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_rmp.go?s=963:1009#L36">G</a></h3>
				<pre>func (o <a href="#Rmp">Rmp</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Rmp.Grad">func (Rmp) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_rmp.go?s=1262:1316#L52">Grad</a></h3>
				<pre>func (o <a href="#Rmp">Rmp</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Rmp.H">func (Rmp) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_rmp.go?s=1154:1200#L47">H</a></h3>
				<pre>func (o <a href="#Rmp">Rmp</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Rmp.Init">func (*Rmp) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_rmp.go?s=445:486#L13">Init</a></h3>
				<pre>func (o *<a href="#Rmp">Rmp</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Sin">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_sin.go?s=404:505#L7">Sin</a></h2>
			<pre>type Sin struct {

    <span class="comment">// parameters</span>
    A <a href="/pkg/builtin/#float64">float64</a>
    B <a href="/pkg/builtin/#float64">float64</a>
    C <a href="/pkg/builtin/#float64">float64</a>
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Sin implements y(t) = a * sin(b*t) + c
Input:
</p>
<pre>b/pi -- is a flag that says that b is in fact b divided by π
        thus, the code will multiply b by π internally
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Sin.F">func (Sin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_sin.go?s=1027:1073#L41">F</a></h3>
				<pre>func (o <a href="#Sin">Sin</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Sin.G">func (Sin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_sin.go?s=1204:1250#L50">G</a></h3>
				<pre>func (o <a href="#Sin">Sin</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Sin.Grad">func (Sin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_sin.go?s=1575:1629#L68">Grad</a></h3>
				<pre>func (o <a href="#Sin">Sin</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Sin.H">func (Sin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_sin.go?s=1385:1431#L59">H</a></h3>
				<pre>func (o <a href="#Sin">Sin</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Sin.Init">func (*Sin) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_sin.go?s=637:678#L24">Init</a></h3>
				<pre>func (o *<a href="#Sin">Sin</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Srmps">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_srmps.go?s=282:335#L4">Srmps</a></h2>
			<pre>type Srmps struct {
    Ca, Cb <a href="/pkg/builtin/#float64">float64</a>
    Ta, Tb <a href="/pkg/builtin/#float64">float64</a>
}</pre>
			<p>
Increasing or decreasing smooth-ramp-smooth function
</p>


			

			

			
			
			

			

			
				
				<h3 id="Srmps.F">func (Srmps) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_srmps.go?s=796:844#L27">F</a></h3>
				<pre>func (o <a href="#Srmps">Srmps</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Srmps.G">func (Srmps) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_srmps.go?s=1028:1076#L38">G</a></h3>
				<pre>func (o <a href="#Srmps">Srmps</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Srmps.Grad">func (Srmps) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_srmps.go?s=1562:1618#L60">Grad</a></h3>
				<pre>func (o <a href="#Srmps">Srmps</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Srmps.H">func (Srmps) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_srmps.go?s=1280:1328#L49">H</a></h3>
				<pre>func (o <a href="#Srmps">Srmps</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Srmps.Init">func (*Srmps) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_srmps.go?s=470:513#L15">Init</a></h3>
				<pre>func (o *<a href="#Srmps">Srmps</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Xpoly1">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly1.go?s=376:434#L7">Xpoly1</a></h2>
			<pre>type Xpoly1 struct {
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Xpoly1 implements F(x) as a 1st order polynomial with the components x[i]
</p>
<pre>functions:

  F(x) =  a0 x0  +  a1 x1  +  a2 x2

or, if &#39;2D = true&#39;:

  F(x) =  a0 x0  +  a1 x1
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Xpoly1.F">func (Xpoly1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly1.go?s=902:951#L35">F</a></h3>
				<pre>func (o <a href="#Xpoly1">Xpoly1</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Xpoly1.G">func (Xpoly1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly1.go?s=1089:1138#L43">G</a></h3>
				<pre>func (o <a href="#Xpoly1">Xpoly1</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Xpoly1.Grad">func (Xpoly1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly1.go?s=1307:1364#L53">Grad</a></h3>
				<pre>func (o <a href="#Xpoly1">Xpoly1</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Xpoly1.H">func (Xpoly1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly1.go?s=1196:1245#L48">H</a></h3>
				<pre>func (o <a href="#Xpoly1">Xpoly1</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Xpoly1.Init">func (*Xpoly1) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly1.go?s=572:616#L18">Init</a></h3>
				<pre>func (o *<a href="#Xpoly1">Xpoly1</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
			
			
			<h2 id="Xpoly2">type <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly2.go?s=535:645#L11">Xpoly2</a></h2>
			<pre>type Xpoly2 struct {
    <span class="comment">// contains filtered or unexported fields</span>
}</pre>
			<p>
Xpoly2 implements F(x) as a 2nd order polynomial with the components x[i]
</p>
<pre>functions:

  F(x) =  a0 x0    +  a1 x1    +  a2 x2
       +  b0 x0²   +  b1 x1²   +  b2 x2²
       + c01 x0 x1 + c12 x1 x2 + c20 x2 x0

or, if &#39;2D = true&#39;:

  F(x) =  a0 x0    +  a1 x1
       +  b0 x0²   +  b1 x1²
       + c01 x0 x1
</pre>


			

			

			
			
			

			

			
				
				<h3 id="Xpoly2.F">func (Xpoly2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly2.go?s=1398:1447#L47">F</a></h3>
				<pre>func (o <a href="#Xpoly2">Xpoly2</a>) F(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
F returns y = F(t, x)
</p>

				
				
				
			
				
				<h3 id="Xpoly2.G">func (Xpoly2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly2.go?s=1756:1805#L59">G</a></h3>
				<pre>func (o <a href="#Xpoly2">Xpoly2</a>) G(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
G returns ∂y/∂t_cteX = G(t, x)
</p>

				
				
				
			
				
				<h3 id="Xpoly2.Grad">func (Xpoly2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly2.go?s=1974:2031#L69">Grad</a></h3>
				<pre>func (o <a href="#Xpoly2">Xpoly2</a>) Grad(v []<a href="/pkg/builtin/#float64">float64</a>, t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>)</pre>
				<p>
Grad returns ∇F = ∂y/∂x = Grad(t, x)
</p>

				
				
				
			
				
				<h3 id="Xpoly2.H">func (Xpoly2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly2.go?s=1863:1912#L64">H</a></h3>
				<pre>func (o <a href="#Xpoly2">Xpoly2</a>) H(t <a href="/pkg/builtin/#float64">float64</a>, x []<a href="/pkg/builtin/#float64">float64</a>) <a href="/pkg/builtin/#float64">float64</a></pre>
				<p>
H returns ∂²y/∂t²_cteX = H(t, x)
</p>

				
				
				
			
				
				<h3 id="Xpoly2.Init">func (*Xpoly2) <a href="https://github.com/cpmech/gosl/blob/master/fun/f_xpoly2.go?s=783:827#L24">Init</a></h3>
				<pre>func (o *<a href="#Xpoly2">Xpoly2</a>) Init(prms <a href="#Prms">Prms</a>) (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Init initialises the function
</p>

				
				
				
			
		
	

	





	
	
		<h2 id="pkg-subdirectories">Subdirectories</h2>
	
	


	<div class="pkg-dir">
		<table>
			<tr>
				<th class="pkg-name">Name</th>
				<th class="pkg-synopsis">Synopsis</th>
			</tr>

			
			<tr>
				<td colspan="2"><a href="..">..</a></td>
			</tr>
			

			
				
					<tr>
						<td class="pkg-name" style="padding-left: 0px;">
							<a href="figs/">figs</a>
						</td>
						<td class="pkg-synopsis">
							
						</td>
					</tr>
				
			
		</table>
	</div>


	


<div id="footer">
<br /><br />
<hr>
<pre class="copyright">
Copyright (c) 2016, The Gosl Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of Gosl nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

</pre><!-- copyright -->
</div><!-- footer -->

</div><!-- container -->
</div><!-- page -->
</body>
</html>
